﻿<local:StereoControl x:Class="HelixToolkit.StereoView3D"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:HelixToolkit"
    x:Name="thisControl">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition Width="2"/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>

        <Viewport3D Name="LeftView" Grid.Column="0">
            <Viewport3D.Camera>
                <PerspectiveCamera/>
            </Viewport3D.Camera>
        </Viewport3D>
        <local:CameraController x:Name="LeftCameraControl" Grid.Column="0" Camera="{Binding Camera, ElementName=thisControl}" 
                CameraRotationMode="{Binding CameraRotationMode, ElementName=thisControl}"
                Viewport="{Binding ElementName=LeftView}"/>

        <Border Background="Black" Grid.Column="1"/>

        <Viewport3D Name="RightView" Grid.Column="2">
            <Viewport3D.Camera>
                <PerspectiveCamera/>
            </Viewport3D.Camera>
        </Viewport3D>
        <local:CameraController x:Name="RightCameraControl" Grid.Column="2" Camera="{Binding Camera, ElementName=thisControl}" 
                CameraRotationMode="{Binding CameraRotationMode, ElementName=thisControl}"
                Viewport="{Binding ElementName=RightView}"/>
    </Grid>
</local:StereoControl>
